@import '@/styles/utils.scss';

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 6px;
}

.chatInput {
  margin-top: 6px;
  margin-bottom: 6px;
}

.tabs {
  display: inline-flex;
  background: #F0F0F0;
  border-radius: 8px;
  padding: 2px;
  gap: 4px;
  border: 1px solid transparent;

  :global(.dark) & {
    background: #1F2023;
    border: 1px solid #3F4245;
  }
}

.tab {
  all: unset;
  padding: 5px 0;
  color: #626262;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  min-width: 70px;
  text-align: center;
  user-select: none;
  width: 78px;
  border-radius: 6px;
  transition: all 0.3s;
  

  &[data-state='active'] {
    color: #fff;
    background: linear-gradient(180deg, #000000 0%, #444444 100%);
    box-shadow: inset 0px 0px 3px 0px rgba(255, 255, 255, 0.48);
  }

  :global(.dark) & {
    color: #A1A1AA;

    &[data-state='active'] {
      color: #fff;
      background: #3F4043;
      box-shadow:none;
    }
  }
}

.inputWrapper {
  width: 100%;
  gap: 12px;
  align-items: flex-end;
  position: relative;
  background: #FFFFFF;
  box-shadow: 0px 5px 10px 0px rgba(223, 226, 233, 0.5);
  border-radius: 16px;
  border: 1px solid #E3E3E3;
  padding: 16px 20px;
  min-height: 132px;
  display: flex;
  flex-direction: column;

  :global(.dark) & {
    color: #fff;
    box-shadow: none;

    background: #2E3033;
    border-radius: 16px;
    border: 1px solid #3F4245;
  }

  .options {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    // margin-top: 20px;
  }
}

.input {
  width: 100%;
  font-size: 16px;
  line-height: 1.5;
  resize: none;
  background: transparent;
  border: none;
  outline: none;
  color: #18181B;
  min-height: 24px;
  max-height: 200px;

  &::placeholder {
    color: #B0B0B0;
  }

  :global(.dark) & {
    color: #fff;

    &::placeholder {
      color: #71717A;
    }
  }
}

.personaTrigger {
  margin-right: 18px !important;
  all: unset;
  cursor: pointer;
  border-radius: 6px;

  transition: background-color 0.2s ease;

  &:hover,
  &[data-state='open'] {
    background-color: #F4F4F5;

    :global(.dark) & {
      background-color: #27272A;
    }
  }
}

.personaButton {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
  color: #71717A;
  border-radius: 8px;

  :global(.dark) & {
    color: #A1A1AA;
    border: 1px solid #3F3F46;
  }
}

.selectContent {
  min-width: 180px;
  background-color: white;
  border-radius: 6px;
  padding: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  animation: slideUpAndFade 0.2s ease;

  :global(.dark) & {
    background-color: #18181B;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  }
}

.selectItem {
  all: unset;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  gap: 8px;
  border-radius: 4px;
  font-size: 14px;
  color: #18181B;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
  position: relative;

  &[data-highlighted] {
    background-color: #F4F4F5;
    outline: none;
  }

  :global(.dark) & {
    color: #FAFAFA;

    &[data-highlighted] {
      background-color: #27272A;
    }
  }
}

.dropdownItem {
  all: unset;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  gap: 8px;
  border-radius: 4px;
  font-size: 14px;
  color: #18181B;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;

  &:hover {
    background-color: #F4F4F5;
  }

  :global(.dark) & {
    color: #FAFAFA;

    &:hover {
      background-color: #27272A;
    }
  }
}

.actionButtons {
  display: flex;
  gap: 16px;
}

.regenerateButton,
.submitButton {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;

  width: 32px;
  height: 32px;

  &:disabled {
    cursor: not-allowed;
    opacity: 0.5;
  }

  .buttonIcon {
    color: #FFFFFF;
  }
}

.regenerateButton {
  background-color: #FFFFFF;
  border: 1px solid #CFCFCF;

  .buttonIcon {
    color: #71717A;
  }

  &:not(:disabled):hover {
    background-color: #F4F4F5;
  }

  :global(.dark) & {
    background-color: #18181B;
    border-color: #3F3F46;

    .buttonIcon {
      color: #A1A1AA;
    }

    &:not(:disabled):hover {
      background-color: #27272A;
    }
  }
}

.submitButton {
  background: linear-gradient(180deg, #000000 0%, #444444 100%);
  box-shadow: inset 0px 0px 3px 0px rgba(255, 255, 255, 0.48);

  &:not(:disabled):hover {
    opacity: 0.75;
  }

  :global(.dark) & {
    background: #3F4043;
    box-shadow: none;

    .buttonIcon {
      color: #fff;
    }
  }
}

.itemText {
  display: flex;
  // align-items: center;
  // font-weight: 600;
  // color: #151515;
}

.mentionPopup {
  position: absolute;
  z-index: 1000;
  animation: slideUpAndFade 0.2s ease;
  left: 0;
  top: -8px;
}

@keyframes slideUpAndFade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.button2 {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  background: #F3F3F3;
  color: #000;

  width: 32px;
  height: 32px;
  border-radius: 8px;

  &:disabled {
    cursor: not-allowed;
    opacity: 0.5;
  }


  &:not(:disabled):hover {
    background: #E1E1E1;
  }

  :global(.dark) & {
    background: transparent;
    border: 1px solid #3F4245;

    svg {
      color: #C4C4C4;
    }

    &:not(:disabled):hover {
      background: transparent;
    }
  }
}


.callWord {
  width: 100%;
  margin-top: 16px;
  transition: all 0.3s;
  overflow: hidden;

  .title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 12px;
  }
}

.suggestionsContainer {
  display: flex;
  // gap: 8px;
  margin-bottom: 12px;
}


.hint {
  color: #151515;
  font-size: 48px;
  margin-bottom: 36px;
  font-weight: 300;
  font-style: normal;
  line-height: 1;

  :global(.dark) & {
    color: #fff;
  }
}

.optionsLeft {
  display: flex;
  align-items: center;
}

.optionsRight {
  display: flex;
  align-items: center;
}


.toolsMsg{
  width: 100%;
  margin-bottom: 16px;
  min-height: 40px;
  background: #E6F4FF;
  border-radius: 8px;
  border: 1px solid #BAE0FF;
  display: flex;
  align-items: center;
  padding: 9px 14px;


  font-weight: 400;
  font-size: 14px;
  color: rgba(0,0,0,0.88);
  word-break: break-all;

  :global(.dark) & {
    background-color: #2E3033;
    border: 1px solid #3F4245;
    color: #fff;

    i{
      color: #fff;
    }
  }

  i{
    color: #0463D8;
    margin-right: 6px;
  }
}

.hintTitle{
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 136px;
}